package com.hliushi.domain;

/**
 * @author: hliushi
 * @date: 2023/2/18 22:10
 **/
public class ElevatorButton {

    /**
     * A button inside elevator is pressed, will generate an internal request and send to the elevator
     */
    private int level;

    private Elevator elevator;


    public ElevatorButton(int level, Elevator elevator) {
        this.level = level;
        this.elevator = elevator;
    }

    public InternalRequest pressButton() {
        return new InternalRequest(this.getLevel());
    }


    public int getLevel() {
        return level;
    }

    public void setLevel(int level) {
        this.level = level;
    }
}
